import { HttpClient } from "../../../../service/Http/HttpClient";

//告警统计数据
export const getDeviceDataList = (pream: string) => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/safety/home/getDeviceDataList", {
    method: "POST",
    headers: {},
    body: pream,
  });
};

//当天告警信息
export const getDeviceWarnDataList = (pream: string) => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/safety/home/getDeviceWarnDataList", {
    method: "POST",
    headers: {},
    body: pream,
  });
};

//运行健康数据
export const getHealthyData = (pream: string) => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/safety/home/getHealthyData", {
    method: "POST",
    headers: {},
    body: pream,
  });
};

//告警图表数据
export const getWarnCountData = (pream: string) => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/safety/home/getWarnCountData", {
    method: "POST",
    headers: {},
    body: pream,
  });
};
/**设备管理 开始 */
//分页查找设备
export const getFindDevice = (pream: string) => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/safety/device/find", {
    method: "POST",
    headers: {},
    body: pream,
  });
};
//删除设备
export const deleteDevice = (pream: string) => {
  const http = HttpClient.instance();
  return http.fetch("/wj/ems/safety/device/delete", {
    method: "POST",
    headers: {},
    body: pream,
  });
};
//下载
export const downTemplate = () => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/safety/device/downTemplate", {
    method: "POST",
    headers: {},
  });
};
//导入
export const importExcelDevice = () => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/safety/device/upload/importExcelDevice", {
    method: "POST",
    headers: {},
  });
};
//新增
export const addDevice = (pream: string) => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/safety/device/add", {
    method: "POST",
    headers: {},
    body: pream,
  });
};
//修改
export const updateDevice = (pream: string) => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/safety/device/update", {
    method: "POST",
    headers: {},
    body: pream,
  });
};
/**设备管理 结束 */
/**设备监控 开始 */
//设备监控最新数据
//
export const getDeviceLastData = (pream: string) => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/safety/monitor/getDeviceLastData", {
    method: "POST",
    headers: {},
    body: pream,
  });
};
/**设备监控 结束 */
